/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局变量 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #ecf0f1;
    --dark-bg: #2c3e50;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* 整体样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* 系统布局 */
.system-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: var(--primary-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.sidebar-header .version {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    background: #f5f7fa;
}

/* 顶部导航栏 */
.top-navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.navbar-breadcrumb {
    color: var(--text-secondary);
    font-size: 14px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: var(--success-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 内容区域 */
.content-wrapper {
    padding: 30px;
}

/* 页面内容 */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* 页面标题 */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-description {
    color: var(--text-secondary);
    font-size: 16px;
}

/* 仪表板卡片 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.card-icon.primary { background: var(--accent-color); }
.card-icon.success { background: var(--success-color); }
.card-icon.warning { background: var(--warning-color); }
.card-icon.danger { background: var(--danger-color); }

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 文件上传样式 */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
    background: #fafbfc;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--accent-color);
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: var(--accent-color);
    background: #f0f8ff;
}

.file-upload-icon {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.file-upload-text {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 结果展示 */
.result-container {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
    animation: slideIn 0.5s ease;
}

.result-success {
    background: #d4edda;
    border-left-color: var(--success-color);
    color: #155724;
}

.result-error {
    background: #f8d7da;
    border-left-color: var(--danger-color);
    color: #721c24;
}

.result-warning {
    background: #fff3cd;
    border-left-color: var(--warning-color);
    color: #856404;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 人脸展示网格 */
.face-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.face-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.face-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.face-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.face-item:hover img {
    transform: scale(1.05);
}

.face-item .face-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
    margin-bottom: 10px;
}

.face-content {
    cursor: pointer;
    transition: var(--transition);
}

.face-content:hover {
    transform: scale(1.02);
}

/* 删除按钮样式 */
.face-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.8);
    z-index: 10;
}

.face-item:hover .face-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.face-delete-btn:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

/* 删除按钮动画 */
@keyframes deleteBtnIn {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.face-delete-btn.show {
    animation: deleteBtnIn 0.3s ease;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

/* 删除确认对话框特殊样式 */
#deleteConfirmModal .modal-content {
    width: auto;
    max-width: 400px;
    height: auto;
    max-height: none;
    overflow: visible;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#deleteConfirmModal .modal-body {
    padding: 20px;
    flex: none;
    display: block;
    min-height: auto;
    overflow: visible;
}

#deleteConfirmModal .modal-body p {
    margin: 0 0 15px 0;
    line-height: 1.5;
}

#deleteConfirmModal .modal-body .btn {
    min-width: 100px;
}

/* 删除确认对话框内容样式 */
.delete-confirm-text {
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.5;
}

.delete-confirm-warning {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.4;
}

.delete-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.delete-confirm-actions .btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.delete-confirm-actions .btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.delete-confirm-actions .btn-outline:hover {
    background: var(--light-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.delete-confirm-actions .btn-danger {
    background: var(--danger-color);
    color: white;
    border: 2px solid var(--danger-color);
}

.delete-confirm-actions .btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

.modal-body img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* 确保图片容器有足够空间 */
.modal-body {
    padding: 20px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    overflow: auto;
}

/* 图片加载状态 */
.modal-body img.loading {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.modal-body img.loaded {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-navbar {
        padding: 15px 20px;
    }
    
    .navbar-title {
        font-size: 20px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .face-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 移动端模态框优化 */
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    /* 移动端删除确认对话框优化 */
    #deleteConfirmModal .modal-content {
        max-width: 95%;
        margin: 0 10px;
    }
    
    .delete-confirm-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .delete-confirm-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .delete-confirm-text {
        font-size: 15px;
    }
    
    .delete-confirm-warning {
        font-size: 13px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--dark-bg);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    z-index: 3000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* 视频检测相关样式 */
.video-controls {
    padding: 12px 20px;
}

.video-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.video-source-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    background: white;
}

.radio-option:hover {
    border-color: var(--accent-color);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: var(--transition);
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-option i {
    margin-right: 8px;
    color: var(--text-secondary);
}

.radio-option input[type="radio"]:checked ~ i {
    color: var(--accent-color);
}

.detection-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    background: white;
}

.checkbox-option:hover {
    border-color: var(--success-color);
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: var(--transition);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    border-color: var(--success-color);
    background: var(--success-color);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-option i {
    margin-right: 8px;
    color: var(--text-secondary);
}

.checkbox-option input[type="checkbox"]:checked ~ i {
    color: var(--success-color);
}

.video-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-item i {
    margin-right: 5px;
    color: var(--accent-color);
}

.video-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/10;
}

.video-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.video-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--border-color);
}

.video-placeholder h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.video-placeholder p {
    font-size: 14px;
}

#videoElement, #videoCanvas {
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.video-result {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    display: none;
}

.video-result.show {
    display: block;
    animation: slideIn 0.3s ease;
}

/* 实时用户信息显示样式 */
.live-user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 8px;
    padding: 15px;
    min-width: 250px;
    max-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.user-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info-header i {
    margin-right: 8px;
    color: var(--accent-color);
}

.user-info-header span {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
}

.history-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.history-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.user-info-content {
    max-height: 200px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-item:last-child {
    border-bottom: none;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 14px;
    font-weight: bold;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.user-status {
    font-size: 11px;
    opacity: 0.8;
}

.user-confidence {
    background: var(--success-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
}

.unknown-user .user-avatar {
    background: var(--danger-color);
}

.unknown-user .user-name {
    color: #ff6b6b;
}

/* 用户信息动画 */
@keyframes userSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.user-item {
    animation: userSlideIn 0.3s ease;
}

/* 滚动条样式 */
.user-info-content::-webkit-scrollbar {
    width: 4px;
}

.user-info-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.user-info-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.user-info-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 检测历史样式 */
.detection-history {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.history-header span {
    font-weight: 600;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.clear-history-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    transition: all 0.3s ease;
}

.clear-history-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.history-content {
    max-height: 120px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item:last-child {
    border-bottom: none;
}

.history-time {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 8px;
    font-size: 10px;
}

.history-user {
    flex: 1;
}

.history-user.recognized {
    color: var(--success-color);
}

.history-user.unknown {
    color: #ff6b6b;
}

.recognition-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid var(--success-color);
}

.recognition-item i {
    color: var(--success-color);
    margin-right: 10px;
    font-size: 16px;
}

.recognition-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: auto;
}

.recognition-confidence {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-source-options,
    .detection-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .video-buttons {
        flex-wrap: wrap;
    }
    
    .video-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .video-container {
        height: 350px;
        aspect-ratio: 4/3;
    }
}